﻿using ConfExpert.Forms.Base;
using ConfExpert.Utility;
using DevTeam;
using System;

namespace ConfExpert.Forms.Depo._7C
{
    public partial class SezonKumas : XForm
    {
        int CKBatchId = -1;
        public SezonKumas(int ckBatchId)
        {
            InitializeComponent();
            this.CKBatchId = ckBatchId;
            this.Text += "- " + AppSession.Lookups.CKBatch.FindByCKBatchId(CKBatchId).Notes;
        }

        private void SezonKumas_Load(object sender, EventArgs e)
        {
            
            gridView1.Init("Get7cKumas", CKBatchId);
            gridView1.FormatAsNumber(1, "AyrilanYuzde", "SipQty", "GelenQty", "AyrilanQty", "CikilanQty", "KalanQty", "GelecekOlanQty");
            gridView1.AddSummary("SipQty", "GelenQty", "AyrilanQty", "CikilanQty", "KalanQty", "GelecekOlanQty");
            gridView1.Columns["AyrilanYuzde"].DisplayFormat.FormatString = "{0:p1}";

            //gridView1.FormatAsPercentage("AyrilanYuzde");
            gridView1.BestFitColumns();
        }
    }
}
